<?php
  //Gennesis Software Manual - Page 8

  $pdf->AddPage();

  //$pdf->Image('./Genesis/Gen-soft/Gsm-01.png',0,0,210 ,297);
  //add_raster($pdf);
  
  
  $margin = array
  (
    'tab_1' => 29,
    'tab_2' => 35,
    'tab_3' => 41
  );
  
  
  $pdf->SetDrawColor(0,0,0);
  $pdf->SetTextColor(0,0,0);

  $pdf->SetFont('arial','B',10);
  set_text_space(4.4);
  new_line(38);
  
  $pdf->Bookmark('I. Memory Map',0,current_line() - 10);
  $pdf->Text($margin['tab_1'],current_line(),'I.');
  $pdf->Text($margin['tab_2'],current_line(),'MEMORY MAP');
  new_line();
  new_line();
  $pdf->SetFont('arial','',10);
  $pdf->Bookmark('A. Mega Drive 16-bit Mode',1,current_line() - 10);
  $pdf->Text($margin['tab_2'],current_line(),'A.');
  $pdf->Text($margin['tab_3'],current_line(),'Mega Drive 16 Bit Mode (as distinct from Master System Compatibility Mode)');
  new_line();
  new_line();
  new_line();
  $pdf->Bookmark('1. 68K Memory Map',2,current_line() - 10);
  $pdf->Text($margin['tab_3'],current_line(),'1.');
  $pdf->Text($margin['tab_3'] + 7,current_line(),'68K MEMORY MAP');


  //Draw the 68K memory map image  
  $image_x = 65;
  $image_y = 78;
  $text_x = $image_x - 23;
  $text_y = $image_y - 2;
  
  $pdf->Text($text_x,$text_y,'$ 0 0 0 0 0 0');
  $pdf->Text($text_x,$text_y + 12,'$ 2 0 0 0 0 0');
    $pdf->CenterText($image_x,$text_y + 12 - 4.4,'ROM',30);
    $pdf->CenterText($image_x,$text_y + 12,'CARTRIDGE',30);
  $pdf->Text($text_x,$text_y + 25,'$ 4 0 0 0 0 0');
  $pdf->Text($text_x,$text_y + 36.5,'$ 6 0 0 0 0 0');
    $pdf->CenterText($image_x,$text_y + 37 - 4.4,'SEGA',30);
    $pdf->CenterText($image_x,$text_y + 37,'RESERVED',30);
  $pdf->Text($text_x,$text_y + 50,'$ 8 0 0 0 0 0');
  $pdf->Text($text_x,$text_y + 57,'$ 9 0 0 0 0 0');
    $pdf->CenterText($image_x,$text_y + 57,'SEGA',30);
    $pdf->CenterText($image_x,$text_y + 57 + 4.4,'RESERVED',30);
  $pdf->Text($text_x,$text_y + 66,'$ A 0 0 0 0 0');
    $pdf->CenterText($image_x,$text_y + 78 - 4.4,'SYSTEM I/O',30);
  $pdf->Text($text_x,$text_y + 78,'$ B 0 0 0 0 0');
    $pdf->CenterText($image_x,$text_y + 90 - 4.4,'SEGA',30);
    $pdf->CenterText($image_x,$text_y + 90,'RESERVED',30);
  $pdf->Text($text_x,$text_y + 90,'$ C 0 0 0 0 0');
    $pdf->CenterText($image_x,$text_y + 102 - 4.4,'VDP',30);
  $pdf->Text($text_x,$text_y + 102,'$ D 0 0 0 0 0');
  $pdf->Text($text_x,$text_y + 111,'$ E 0 0 0 0 0');
    $pdf->CenterText($image_x,$text_y + 123 - 4.4,'WORK RAM',30);
  $pdf->Text($text_x,$text_y + 123,'$ F 0 0 0 0 0');
  
  //68K part
  $pdf->Rect($image_x,$image_y,30,123);
  $pdf->Rect($image_x,$image_y+24.5,30,25);
  $pdf->Rect($image_x,$image_y+66,30,24);
  $pdf->Line($image_x,$image_y+78,$image_x + 73,$image_y+78);

  //Z80 upper part
  $pdf->Rect($image_x + 43,$image_y+33.5,30,44.5);
  $pdf->Rect($image_x + 43,$image_y+42,30,24);
  $pdf->Line($image_x + 43,$image_y+50,$image_x + 73,$image_y+50);
  
  $text_x = $image_x + 73 + 3;
  $text_y = $image_y + 33.5 - 3;
  
  $pdf->Text($text_x,$text_y,'$ A 0 0 0 0 0');
    $pdf->CenterText($image_x + 43,$text_y + 8,'Z80',30);
  $pdf->Text($text_x,$text_y + 8,'$ A 1 0 0 0 0');
    $pdf->CenterText($image_x + 43,$text_y + 17,'I/O',30);
  $pdf->Text($text_x,$text_y + 17,'$ A 1 1 0 0 0');
    $pdf->CenterText($image_x + 43,$text_y + 34 - 4.4,'CONTROL',30);
  $pdf->Text($text_x,$text_y + 34,'$ A 1 2 0 0 0');
    $pdf->CenterText($image_x + 43,$text_y + 37 + 4.4,'SEGA',30);
    $pdf->CenterText($image_x + 43,$text_y + 37 + 4.4 + 4.4,'RESERVED',30);

  //Z80 lower part
  $pdf->Line($image_x,$image_y+111,$image_x + 73,$image_y+111);
  $pdf->Rect($image_x + 43,$image_y+111,30,20);
  $pdf->Line($image_x + 43,$image_y+123,$image_x + 73,$image_y+123);

  $text_y = $image_y + 111 - 1.5;
  
  $pdf->Text($text_x,$text_y,'$ E 0 0 0 0 0');
    $pdf->CenterText($image_x + 43,$text_y + 12 - 4.4,'ACCESS',30);
    $pdf->CenterText($image_x + 43,$text_y + 12 ,'PROHIBITED',30);
  $pdf->Text($text_x,$text_y + 12,'$ F F 0 0 0 0');
    $pdf->CenterText($image_x + 43,$text_y + 10.5 + 4.4 + 4.4,'WORK RAM',30);
  $pdf->Text($text_x,$text_y + 27,'$ F F F F F F');

  add_footer($pdf,'02/19/92','1');


?>
